var repair_detail = function () {
    var father_pro = $("#proDiv");
    addPro(father_pro, localStorage['state']);
};

var addPro = function (fatherDiv, state) {
    if (state == 0) {
        in_pro(1, "审核中").appendTo(fatherDiv);
        out_pro(2, "分配任务中").appendTo(fatherDiv);
        out_pro(3, "处理中").appendTo(fatherDiv);
        out_pro(4, "已处理").appendTo(fatherDiv);
    } else if (state == 1) {
        in_pro(1, "审核中").appendTo(fatherDiv);
        in_pro(2, "分配任务中").appendTo(fatherDiv);
        out_pro(3, "处理中").appendTo(fatherDiv);
        out_pro(4, "已处理").appendTo(fatherDiv);
    } else if (state == 2) {
        in_pro(1, "审核中").appendTo(fatherDiv);
        in_pro(2, "分配任务中").appendTo(fatherDiv);
        in_pro(3, "处理中").appendTo(fatherDiv);
        out_pro(4, "已处理").appendTo(fatherDiv);
    } else if (state == 3) {
        in_pro(1, "审核中").appendTo(fatherDiv);
        in_pro(2, "分配任务中").appendTo(fatherDiv);
        in_pro(3, "处理中").appendTo(fatherDiv);
        in_pro(4, "已处理").appendTo(fatherDiv);
    } else if (state == 4) {
        in_pro(1, "审核中").appendTo(fatherDiv);
        in_pro(2, "").appendTo(fatherDiv);
        in_pro(3, "").appendTo(fatherDiv);
        in_pro(4, "未通过审核").appendTo(fatherDiv);
    }
    localStorage.removeItem('state');
};


var stateChangeText = function (code) {
    var msg = "";
    if (code == 0) {
        msg = "审核中";
    } else if (code == 1) {
        msg = "分配任务中";
    } else if (code == 2) {
        msg = "处理中";
    } else if (code == 3) {
        msg = "已处理";
    } else if (code == 4) {
        msg = "未通过审核";
    }
    return msg;
};

$("#return").click(function () {
    console.log(1);
    var url = "/page/student/repairList";
    $("#body").load(url);
    // addRepairListData(8, 1);
})
